<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title>每周三商机跟踪详情</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link href="/dist/plugins/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=4a6c1b54">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style>
        .model-picker-input {
            opacity: 0 !important;
            top: -9999px;
            left: -9999px;
            position: absolute;
        }

        .model-picker-span {
            position: relative;
            display: block;
            outline: 0;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            border-bottom: 1px solid #ccc;
            background-color: #fff;
            color: #ccc;
            cursor: pointer;
        }

        .model-picker-span > .placeholder {
            color: #aaa;
        }

        .model-picker-span > .arrow {
            position: absolute;
            top: 50%;
            right: 8px;
            width: 10px;
            margin-top: -3px;
            height: 5px;
            background: url(../images/drop-arrow.png) -10px -25px no-repeat;
        }

        .model-picker-span.focus,
        .model-picker-span.open {
            border-bottom-color: #46A4FF;
        }

        .model-picker-span.open > .arrow {
            background-position: -10px -10px;
        }

        .model-picker-span > .title > span {
            color: #333;
            padding: 5px;
            border-radius: 3px;
        }

        .model-picker-span > .title > span:hover {
            background-color: #f1f8ff;
        }

        .model-picker-dropdown {
            position: absolute;
            width: 315px;
            left: -9999px;
            top: -9999px;
            outline: 0;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            z-index: 999999;
            display: none;
            min-width: 200px;
            margin-bottom: 20px;
            margin-top: 5px;
        }

        .model-select-wrap {
            box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
        }

        .model-select-tab {
            border-bottom: 1px solid #ccc;
            background: #f5f5f5;
            /*font-size: 13px;*/
        }

        .model-select-tab > a {
            display: inline-block;
            padding: 4px 20px;
            border-left: 1px solid #ccc;
            border-bottom: 1px solid transparent;
            color: #4D4D4D;
            text-align: center;
            outline: 0;
            text-decoration: none;
            cursor: pointer;
            /*font-size: 14px;*/
            margin-bottom: -1px;
        }

        .model-select-tab > a.active {
            background: #fff;
            border-bottom: 1px solid #fff;
            color: #46A4FF;
        }

        .model-select-tab > a:first-child {
            border-left: none;
        }

        .model-select-tab > a:last-child.active {
            border-right: 1px solid #ccc;
        }

        .model-select-content {
            width: 100%;
            min-height: 50px;
            background-color: #fff;
            padding: 5px 5px;
        }

        .model-select dl {
            line-height: 2;
            clear: both;
            padding: 3px 0;
            margin: 0;
            max-height: 200px;
            overflow-y: scroll;
        }

        .model-select dt {
            position: absolute;
            width: 2.5em;
            font-weight: 500;
            text-align: right;
            line-height: 2;
        }

        .model-select dd {
            margin-left: 0;
            line-height: 2;
        }

        .model-select.province dd {
            margin-left: 3em;
        }

        .model-select a {
            display: inline-block;
            padding: 0 10px;
            outline: 0;
            text-decoration: none;
            white-space: nowrap;
            margin-right: 2px;
            color: #333;
            cursor: pointer;
        }

        .model-select a:hover,
        .model-select a:focus {
            background-color: #f1f8ff;
            border-radius: 2px;
            color: #46A4FF;
        }

        .model-select a.active {
            background-color: #46A4FF;
            color: #fff;
            border-radius: 2px;
        }

        .table-detail input[type=text] {
            padding-left: 0;
        }

        td {
            color: #2a8cec;
        }

        td.td-title, td select, td .filename, td.td-module {
            color: #333;
        }

        select {
            color: rgb(42, 140, 236) !important;
            background: #fff;
        }

        .table-detail td {
            /*font-size: 16px;*/
            line-height: 35px;
            height: 35px;
            border-right: 1px solid #cbcbcb;
            border-bottom: 1px solid #cbcbcb;
        }

        .table-detail td.td-title {
            line-height: 1.5;
            background: #F5F5F5;
        }

        .table-detail td.td-row3 {
            height: 70px;
            line-height: 20px;
            max-height: 70px;
            overflow: hidden;
            position: relative;
        }

        .yuying {
            position: absolute;
            right: 10px;
            bottom: 10px;
            width: 20px;
            height: 20px;
            background: url("/dist/img/yuyin.png");
            background-size: cover;
            cursor: pointer;
        }

        input {
            text-align: left !important;
        }

        .table-detail td.td-value {
            text-align: left !important;
            padding-left: 4px !important;
            /*font-size: 16px !important;*/
        }

        .btn-group-xs > .btn, .btn-xs {
            padding: 1px 5px;
            /*font-size: 16px;*/
            line-height: 1.5;
            border-radius: 3px;
        }

        .table-detail textarea {
            height: 60px;
            width: 100%;
            border: none;
            outline: none;
            -webkit-appearance: none;
            resize: none;
            line-height: 20px;
            padding-top: 2px !important;
            padding-left: 6px;
        }

        .td-row3 span {
            max-height: 60px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            text-align: left;

        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .td-module td {
            color: black;
            font-weight: bold;
            background: yellow;
        }

        .table-detail {
            border-left: 1px solid #cbcbcb;
            border-top: 1px solid #cbcbcb;
        }

        .table-detail .td-module {
            background-color: yellow;
        }

        span.lineOne {
            line-height: 20px;
            height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
        }

        .table-detail td.td-value2 {
            padding: 1px !important;
            text-align: left !important;
        }

        .td-value2 input {
            box-shadow: inset 1px 1px 4px #333;
            height: 100% !important;
            padding-left: 4px !important;
        }

        .span-a-btn {
            position: absolute;
            right: 10px;
        }

        .table-detail td.td-value {
            text-align: left !important;
            padding-left: 4px !important;
            /*font-size: 16px !important;*/
        }
    </style>
</head>
<body>
<iframe id="ifAttach" style="display:none"></iframe>
<section class="content" id="app" v-cloak style="padding: 0px;">
    <div class="div-td-content-more"><i></i></div>
    <div class="model-picker-dropdown">
        <div class="model-select-wrap">
            <div class="model-select-tab">
                <a class="active" data-count="type">省</a><a class="" data-count="brand">市</a><a
                    data-count="model"
                    class="">县</a>
            </div>
            <div class="model-select-content">
                <div class="model-select type" data-count="type" style="display: block;">
                    <dl class="clearfix">
                        <a class="" :attr-id="item.id" v-for="item in itemsType">{{item.name}}</a>
                    </dl>
                </div>
                <div class="model-select brand" data-count="province">
                    <dl class="clearfix">
                        <a class="" :attr-id="item.id"
                           v-for="(item,i) in itemsBran">{{item.name}}</a>
                    </dl>
                </div>
                <div class="model-select model" data-count="model">
                    <dl class="clearfix">
                        <a class="" :attr-id="item.id"
                           v-for="(item,i) in itemsMod">{{item.name}}</a>
                    </dl>
                </div>
            </div>
        </div>
    </div>
    <div class="center" style="overflow:auto;overflow-x:hidden;">
        <table class="table-detail">
            <tr class="td-module">
                <td colspan="4">客户基本信息</td>
            </tr>
            <tr>
                <td class="td-title" style="width: 25%;">经销商</td>
                <td class="td-value" style="width: 25%;">{{addEn()}}</td>
                <td class="td-title" style="width: 25%;">销售员姓名</td>
                <td class="td-value" style="width: 25%;">{{track.main.regionalManagerName}}</td>
            </tr>
            <tr>
                <td class="td-title">客户姓名</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-if="pageType=='edit'" v-model="track.main.customerName"
                           id="customerName" placeholder="请输入" @blur="checkProp('customerName')"/>
                    <span v-else style="padding-left: 4px;">{{track.main.customerName}}</span>
                </td>
                <td class="td-title">客户电话</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-if="pageType=='edit'" v-model="track.main.customerTel"
                           @blur="checkProp('customerTel')"/>
                    <span v-else style="padding-left: 4px;">{{track.main.customerTel}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">城市/区域(客户户口所在地)</td>
                <td class="td-tanZongStyle">
                    <!-- <input type="text" v-model="track.main.customerAddress" v-if="pageType=='edit'">
                     <span v-else style="padding-left: 4px;">{{track.main.customerAddress}}</span>-->
                    <input type="text" class="selectModel" v-if="pageType=='edit'"
                           :value="showDz()"
                           @blur="checkProp('customerAddress')">
                    <span v-else v-html="showDz()" style="padding-left: 4px;"></span>
                </td>
                <td class="td-title">用户项目所在地</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.buildCityName" v-if="pageType=='edit'"
                           @blur="checkProp('buildCityName')">
                    <span v-else style="padding-left: 4px;">{{track.main.buildCityName}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">是否迪尔老客户</td>
                <td class=" td-tanZongStyle">
                    <select v-model="track.main.yhdeOlder" v-if="pageType=='edit'"
                            @change="checkProp('yhdeOlder')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in yhdeOlder" v-bind:value="item.value">
                            {{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.yhdeOlder}}</span>
                </td>
                <td class="td-title">现有机型</td>
                <!--<td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.havingModel" v-if="pageType=='edit'"
                           @blur="checkProp('havingModel')">
                    <span v-else style="padding-left: 4px;">{{track.main.havingModel}}</span>
                </td>-->
                <td class="td-tanZongStyle">
                    <template v-if="pageType=='edit'&&track.main.yhdeOlder!='Yes是'">
                        <span >
                            <input type="text" v-model="track.main.havingModel"
                               @blur="checkProp('havingModel')">
                        </span>
                    </template>
                    <template v-else-if="track.main.yhdeOlder=='Yes是'&&pageType=='edit'">
                        <select   v-model="track.main.havingModel"
                                 @change="checkProp('havingModel')">
                            <option selected value=""></option>
                            <option v-for="(item,i) in myModelList" v-bind:value="item.modelName">
                                {{item.modelName}}
                            </option>
                        </select>
                    </template>
                    <span v-else style="padding-left: 4px;">{{track.main.havingModel}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">工况</td>
                <td class="td-tanZongStyle" colspan="3">
                    <input type="text" v-model="track.main.buildCondition"
                           @blur="checkProp('buildCondition')"
                           v-if="pageType=='edit'"
                           placeholder="水利水电，土方，自己有工程，自己开公司，自己开石料厂，租赁设备，沙场，石料厂，城市建设，煤矿等">
                    <span v-else style="padding-left: 4px;">{{track.main.buildCondition}}</span>
                </td>
            </tr>
            <tr class="td-module">
                <td colspan="4">商机信息</td>
            </tr>
            <tr>
                <td class="td-title">商机确认日期</td>
                <td class=" td-value">{{getMyDate()}}
                </td>
                <td class="td-title">商机目前状态</td>
                <td class=" td-tanZongStyle">
                    <select v-model="track.main.confirmationStatus" v-if="pageType=='edit'"
                            @change="changeState('confirmationStatus')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in confirmationStatus" v-bind:value="item.value">
                            {{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.confirmationStatus}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">关单机率</td>
                <td class=" td-tanZongStyle">
                    <select v-model="track.main.closeorderProbability" v-if="pageType=='edit'"
                            @change="checkProp('closeorderProbability')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in closeorderProbability" v-bind:value="item.value">
                            {{item.name}}
                        </option>
                    </select>
                    <span v-else
                          style="padding-left: 4px;">{{track.main.closeorderProbability}}</span>
                </td>
                <td class="td-title">需求机型</td>
                <td class=" td-tanZongStyle">
                    <select v-model="track.main.needModel" v-if="pageType=='edit'"
                            @change="checkProp('needModel')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in myModelList" v-bind:value="item.modelName">
                            {{item.modelName}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.needModel}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">需求台量</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.needNumber"
                           @blur="checkProp('needNumber')"
                           v-if="pageType=='edit'">
                    <span v-else style="padding-left: 4px;">{{track.main.needNumber}}</span>
                    <span style="color: #46A4FF;position:absolute;left:105px;top: 0px;">台</span>
                </td>
                <td class="td-title">二手机置换型号</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.replacementModel"
                           @blur="checkProp('replacementModel')"
                           v-if="pageType=='edit'" placeholder="如没有,请填无">
                    <span v-else style="padding-left: 4px;">{{track.main.replacementModel}}</span>
                </td>
            </tr>
            <tr>
                <td v-if="track.main.confirmationStatus.indexOf('已交车') > 0" class="td-title">
                    实际赢单日期
                </td>
                <td v-else-if="track.main.confirmationStatus.indexOf('丢单') > 0 " class="td-title">
                    实际丢单日期
                </td>
                <td v-else class="td-title">预计交机日期</td>
                <td class=" td-tanZongStyle">
                    <select v-model="track.main.deliveryDate" v-if="pageType=='edit'"
                            @change="checkProp('deliveryDate')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in myDateTimeList" v-bind:value="item.value">
                            {{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.deliveryDate}}</span>
                </td>
                <td class="td-title">购机方式</td>
                <td class=" td-tanZongStyle">
                    <select v-model="track.main.buyType" v-if="pageType=='edit'"
                            @change="checkProp('buyType')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in buyType" v-bind:value="item.value">{{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.buyType}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">经销商报价</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.dealerquote" v-if="pageType=='edit'"
                           @blur="checkProp('dealerquote')">
                    <span v-else style="padding-left: 4px;">{{track.main.dealerquote}}</span>
                    <span style="color: #46A4FF;position:absolute;left:105px;top: 0px;">万元</span>
                </td>
                <td class="td-title">成交概率</td>
                <td class="td-tanZongStyle">
                    <select v-model="track.main.transactionProbability" v-if="pageType=='edit'"
                            @change="checkProp('transactionProbability')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in transactionProbability"
                                v-bind:value="item.value">{{item.name}}
                        </option>
                    </select>
                    <span v-else
                          style="padding-left: 4px;">{{track.main.transactionProbability}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">目前竞争品牌</td>
                <td class="td-tanZongStyle" colspan="3">
                    <select v-model="track.main.competitorBrand" v-if="pageType=='edit'"
                            @change="checkProp('competitorBrand')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in competitorBrand"
                                v-bind:value="item.value">{{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.competitorBrand}}</span>
                </td>

            </tr>
            <tr>
                <td class="td-title">经销商提供的促销政策</td>
                <td class="td-tanZongStyle" colspan="3">
                    <input type="text" v-model="track.main.dealerpolicy" v-if="pageType=='edit'"
                           placeholder="如没有,请填无"
                           @blur="checkProp('dealerpolicy')">
                    <span v-else style="padding-left: 4px;">{{track.main.dealerpolicy}}</span>
                </td>
            </tr>
            <tr class="td-module">
                <td colspan="4">丢单信息</td>
            </tr>
            <tr>
                <td class="td-title">丢单给哪个品牌</td>
                <td class="td-tanZongStyle">
                    <select
                            v-model="track.main.lostorderBrand"
                            v-if="pageType=='edit' && track.main.confirmationStatus.indexOf('丢单')>0"
                            @change="changeLostBrandPosition('lostorderBrand')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in lostBrandAndModel"
                                v-bind:value="item.name">
                            {{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.lostorderBrand}}</span>
                </td>
                <td class="td-title">丢单给哪个型号</td>
                <td class="td-tanZongStyle">
                    <select v-model="track.main.lostorderModel"
                            v-if="pageType=='edit' && track.main.confirmationStatus.indexOf('丢单')>0"
                            @change="checkProp('lostorderModel')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in lostBrandAndModel[lostBrandPosition].value"
                                v-bind:value="item.value">
                            {{item.name}}
                        </option>
                    </select>
                    <!--<input type="text" v-model="track.main.lostorderModel" @blur="checkProp"
                           v-if="pageType=='edit' && track.main.confirmationStatus.indexOf('丢单')>0"
                           style="height: 35px !important;">-->
                    <span v-else style="padding-left: 4px;">{{track.main.lostorderModel}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">如丢单，是否丢给二手机</td>
                <td class=" td-tanZongStyle">
                    <select v-model="track.main.lostorderFlag"
                            v-if="pageType=='edit' && track.main.confirmationStatus.indexOf('丢单')>0"
                            @change="checkProp('lostorderFlag')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in lostorderFlag" v-bind:value="item.value">
                            {{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.lostorderFlag}}</span>
                </td>
                <td class="td-title">丢单原因</td>
                <td class="td-tanZongStyle">
                    <select v-model="track.main.lostorderReason"
                            v-if="pageType=='edit' && track.main.confirmationStatus.indexOf('丢单')>0"
                            @change="checkProp('lostorderReason')">
                        <option selected value=""></option>
                        <option v-for="(item,i) in lostorderReason" v-bind:value="item.value">
                            {{item.name}}
                        </option>
                    </select>
                    <span v-else style="padding-left: 4px;">{{track.main.lostorderReason}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">丢单原因详述</td>
                <td class="td-tanZongStyle" colspan="3">
                    <input type="text" v-model="track.main.lostorderReasonDetails"
                           @blur="checkProp('lostorderReasonDetails')"
                           v-if="pageType=='edit' && track.main.confirmationStatus.indexOf('丢单')>0"
                           placeholder="请输入"
                           style="height: 35px !important;">
                    <span v-else
                          style="padding-left: 4px;">{{track.main.lostorderReasonDetails}}</span>
                </td>
            </tr>
            <tr class="td-module">
                <td colspan="4">赢单信息</td>
            </tr>
            <tr>
                <td class="td-title">赢单品牌最终卖价</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.salePrice" v-if="pageType=='edit'"
                           @blur="checkProp('salePrice')">
                    <span v-else style="padding-left: 4px;">{{track.main.salePrice}}</span>
                    <span style="color: #46A4FF;position:absolute;left:105px;top: 0px;">万元</span>
                </td>
                <td class="td-title">赢单品牌利率</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.interestRate"
                           @blur="checkProp('interestRate')"
                           v-if="pageType=='edit'">
                    <span v-else style="padding-left: 4px;">{{track.main.interestRate}}</span>
                    <span style="color: #46A4FF;position:absolute;left:105px;top: 0px;">%</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">赢单品牌首付比例</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.downPayment"
                           @blur="checkProp('downPayment')"
                           v-if="pageType=='edit'">
                    <span v-else style="padding-left: 4px;">{{track.main.downPayment}}</span>
                    <span style="color: #46A4FF;position:absolute;left:105px;top: 0px;">%</span>
                </td>
                <td class="td-title">赢单品牌置换补贴</td>
                <td class="td-tanZongStyle">
                    <input type="text" v-model="track.main.replacementSubsidy"
                           @blur="checkProp('replacementSubsidy')"
                           placeholder="如没有,请填无"
                           v-if="pageType=='edit'">
                    <span v-else
                          style="padding-left: 4px;">{{track.main.replacementSubsidy}}</span>
                </td>
            </tr>
            <tr>
                <td class="td-title">赢单品牌配件赠送金额</td>
                <td class="td-tanZongStyle" colspan="3">
                    <input type="text" v-model="track.main.accessbonus" v-if="pageType=='edit'"
                           placeholder="如没有,请填无"
                           @blur="checkProp('accessbonus')">
                    <span v-else style="padding-left: 4px;">{{track.main.accessbonus}}</span>
                </td>
            </tr>
            <tr class="td-module">
                <td colspan="4">其他信息</td>
            </tr>
            <tr>
                <td class="td-title">其他信息</td>
                <td class="td-tanZongStyle" >
                    <input type="text" v-model="track.main.otherInformation"
                           @blur="checkProp('otherInformation')"
                           v-if="pageType=='edit'" placeholder="如没有,请填无">
                    <span v-else style="padding-left: 4px;">{{track.main.otherInformation}}</span>
                </td>
                <td class="td-title">信息填写完整度</td>
                <td class="td-value">
                    <span style="padding-left: 4px;">{{track.main.informationIntegrity}}</span>
                </td>
            </tr>
        </table>


        <!--审批进度-->
        <table v-if="track.main.auditFlag != '-1'" class="table-detail"
               style="width: 100%;table-layout: auto;margin-top:30px ;">
            <tr>
                <td class="td-title" colspan="5"
                    style="text-align: center;width: 100%;color: black;background:yellow;font-weight: bold;">
                    审批进度
                </td>
            </tr>
            <tr>
                <td class="td-title" style="width:16%;">审核顺序</td>
                <td class="td-title" style="width:17%;">审核人员</td>
                <td class="td-title" style="width:16%;">审核状态</td>
                <td class="td-title" style="width:17%;">审核时间</td>
                <td class="td-title">审核意见</td>
            </tr>
            <tr v-for="(item,i) in track.auditList">
                <td>
                    <span>第{{i+1}}审核人</span>
                </td>
                <td>
                    <span>{{item.roleName}}-{{item.auditorName}}</span>
                </td>
                <td>
                        <span v-if="(item.auditFlag==0&&item.auditorId==track.main.currentAuditId) || item.auditFlag==2 "
                              style="color:red;">{{convertAuditFlagToName(item)}}</span>
                    <span v-else>{{convertAuditFlagToName(item)}}</span>
                </td>
                <td>{{item.auditTime}}</td>
                <td v-if="item.auditFlag=='1'">同意!</td>
                <td v-else>{{item.auditAdvise}}</td>
            </tr>
            <!--<tr>-->
            <!--<td class="td-title" style="width:16%;">抄送人</td>-->
            <!--<td colspan="5" style="text-align: left;padding-left: 6px !important;">-->
            <!--<span v-for="(item,i) in copiers">{{item.copierName}}; </span>-->
            <!--</td>-->
            <!--</tr>-->
        </table>
        <!--审批历史-->
        <table v-if="track.auditHistorys && track.auditHistorys.length>0" class="table-detail"
               style="width: 100%;table-layout: auto;margin-top:30px "
               v-if="pageType!='edit' && track.auditHistorys.length>0">
            <tr>
                <td class="td-title" colspan="5"
                    style="text-align: center;width: 100%;color: black;background:yellow;font-weight: bold">
                    历史驳回记录
                </td>
            </tr>
            <tr>
                <td class="td-title" style="width:16%;">驳回人员</td>
                <td class="td-title" style="width:17%;">驳回时间</td>
                <td class="td-title">驳回原因</td>
            </tr>
            <tr v-for="(item,i) in track.auditHistorys">
                <td>
                    <span>{{item.auditorName}}</span>
                </td>
                <td>{{item.auditTime}}</td>
                <td>{{item.auditAdvise}}</td>
            </tr>
        </table>

        <div class="south no-print" style="height:50px;line-height:50px;text-align:center;">
            <template v-if="pageType == 'edit'">
                <input type="button" style="margin-left:20px;" value="保存草稿"
                       class="btn btn-primary btn-sm"
                       @click="save('-1')">
                <input type="button" style="margin-left:20px;" value="提交"
                       class="btn btn-primary btn-sm"
                       @click="save('0')">
            </template>
            <template v-if="currentUser.id==track.main.currentAuditId && pageType == 'audit'">
                <input type="button" style="margin-left:20px;" value="通过"
                       class="btn btn-primary btn-sm"
                       @click="applyAudit('1')">
                <input type="button" style="margin-left:20px;" value="驳回"
                       class="btn btn-primary btn-sm"
                       @click="copierReturn">
            </template>
        </div>
    </div>


    </div>
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<!--ztree组件所需js-->
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.exhide-3.5.js"></script>
<script>
    $(function () {
        $("body").on("click", ".lineOne,.lineTwo,.lineF", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {
                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
    $(function () {
        $("body").on("click", ".selectModel", function (e) {
            if ($(".model-picker-dropdown").is(":hidden")) {
                $(".model-picker-dropdown").css({
                    "width": $(this).outerWidth() + "px",
                    "left": $(this).offset().left,
                    "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                }).show();
                e.stopPropagation();
            } else {
                $(".model-picker-dropdown").hide();
            }
        });
        $("body").on("click", ".model-select-tab a", function (e) {
            $(this).parent().find("a").removeClass("active");
            $(this).addClass("active");
            var boxName = $(this).attr("data-count");
            $(".model-select").hide();
            $(".model-select-content" + " ." + boxName).show();
        });
        $("body").on("click", ".model-select  a", function (e) {
            if ($(this).hasClass("active")) {
                return false;
            }
            $(this).parent().find("a").removeClass("active");
            var id = $(this).attr("attr-id");
            $(this).addClass("active");
            var val = $(this).text();
            if ($(this).parents(".model-select").hasClass("type")) {
                $(".model-select-tab a").removeClass("active");
                $(".model-select-tab a[data-count=brand]").addClass("active");
                $(".model-select").hide();
                app.track.main.provinceName = val;
                app.track.main.cityName = '';
                app.track.main.countyName = '';
                app.getCity(id);
                $(".model-select-content .brand").show();

            } else if ($(this).parents(".model-select").hasClass("brand")) {
                $(".model-select-tab a").removeClass("active");
                var id = $(this).attr("attr-id");
                $(".model-select-tab a[data-count=model]").addClass("active");
                $(".model-select").hide();
                app.track.main.cityName = val;
                app.track.main.countyName = '';
                app.getCounty(id);
                $(".model-select-content .model").show();

            } else {
                app.track.main.countyName = val;
                $(".model-picker-dropdown").hide();
                app.track.main.customerAddress = app.track.main.provinceName + app.track.main.cityName + app.track.main.countyName
                app.checkProp('customerAddress')
            }
        })
        $("body").on("click", ".model-picker-dropdown", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".model-picker-dropdown").hide();
        });
    });
</script>
<script type="text/javascript">
    //    var api = frameElement.api, W = api.opener;

    function refresh() {

    }

    var app = new Vue({
        el: '#app',
        data: {
            id: $.wyui.page.urlParams.id ? $.wyui.page.urlParams.id : '',
            pageType: $.wyui.page.urlParams.pageType,//页面类型
            myDateList: [],
            myDateTimeList: [],
            MyLostDate: [],
            myModelList: [],
            myCheckList: [],
            myLoseList: [],
            currentUser: getCurrentUser(),
            itemsCom: [],
            itemsBran: [],
            itemsType: [],
            itemsMod: [],
            provinceId: '省份',
            cityId: '市区',
            countyId: '县',
            inputNum: 0,//当不为丢单时
            allNum: 29,//共29个输入
            allInputParamObj: {},//所以输入的参数的对象
            track: {
                main: {
                    auditFlag: '-1',
                    id: '',
                    day: $.wyui.page.urlParams.day,
                    companyId: getCurrentUser().companyId,
                    customerId: getCurrentUser().customerId,
                    regionalManagerId: getCurrentUser().id,
                    bigRegionalId: getCurrentUser().departId,
                    regionalId: '',
                    companyName: getCurrentUser().companyName,
                    customerAddress: '',
                    buildCityName: '',
                    confirmationDate: '',
                    closeorderProbability: '',
                    customerTel: '',
                    customerName: '',
                    yhdeOlder: '',
                    havingModel: '',
                    buildCondition: '',
                    needModelId: '',
                    needModel: '',
                    needNumber: '',
                    replacementModel: '',
                    competitorBrand: '',
                    buyType: '',
                    confirmationStatus: '',
                    dealerquote: '',
                    dealerpolicy: '',
                    deliveryDate: '',
                    yujiLoseDate: '',
                    shijiDeliveryDate: '',
                    actualDate: '',
                    regionalManagerName: getCurrentUser().name,
                    lostorderBrand: '',
                    lostorderModel: '',
                    lostorderFlag: '',
                    lostorderReason: '',
                    lostorderReasonDetails: '',
                    salePrice: '',
                    interestRate: '',
                    downPayment: '',
                    replacementSubsidy: '',
                    accessbonus: '',
                    otherInformation: '',
                    informationIntegrity: '系统自动计算',
                    transactionProbability: '',
                    provinceName: '',
                    cityName: '',
                    countyName: ''
                },
                auditList: [],
                auditHistorys: []
            },
            confirmationStatus: [
                {
                    value: 'Initial contact with customer初步接触',
                    name: 'Initial contact with customer初步接触'
                },
                {value: 'Sales pitch销售跟进', name: 'Sales pitch销售跟进'},
                {value: 'Commercial negotiation商业条件商谈', name: 'Commercial negotiation商业条件商谈'},
                {value: 'Customer deposit made收取定金', name: 'Customer deposit made收取定金'},
                {
                    value: 'Application submitted to JDFL融资审批申请已提交',
                    name: 'Application submitted to JDFL融资审批申请已提交'
                },
                {value: 'Retail financing approved融资已批准', name: 'Retail financing approved融资已批准'},
                {
                    value: 'Machine delivered to customer已交车',
                    name: 'Machine delivered to customer已交车'
                },
                {value: 'Deal lost丢单', name: 'Deal lost丢单'},
                {
                    value: 'Customer purchase postponed客户购车计划推迟',
                    name: 'Customer purchase postponed客户购车计划推迟'
                },

            ],
            closeorderProbability: [
                {value: 'High高', name: 'High高'},
                {value: 'Mid中', name: 'Mid中'},
                {value: 'Low低', name: 'Low低'},
            ],
            yhdeOlder: [
                {value: 'Yes是', name: 'Yes是'},
                {value: 'No否', name: 'No否'},
            ],
            lostorderFlag: [
                {value: 'Y是', name: 'Y是'},
                {value: 'N否', name: 'N否'},
            ],
            buildCondition: [
                {value: '接工程', name: '接工程'},
                {value: '沙场', name: '沙场'},
                {value: '石料厂', name: '石料厂'},
                {value: '水利水电', name: '水利水电'},
                {value: '土方', name: '土方'},
                {value: '挖机租赁', name: '挖机租赁'},
                {value: '自己开公司', name: '自己开公司'},
                {value: '自己开石料厂', name: '自己开石料厂'},
                {value: '自己有工程', name: '自己有工程'},
                {value: '租赁设备', name: '租赁设备'},
                {value: '租赁挖掘机', name: '租赁挖掘机'},
            ],
            competitorBrand: [
                {value: '无', name: '无'},
                {value: 'CAT卡特', name: 'CAT卡特'},
                {value: 'Hitachi日立', name: 'Hitachi日立'},
                {value: 'Kobelco神钢', name: 'Kobelco神钢'},
                {value: 'Komatsu小松', name: 'Komatsu小松'},
                {value: 'Sumitomo住友', name: 'Sumitomo住友'},
                {value: 'Volvo沃尔沃', name: 'Volvo沃尔沃'},
                {value: 'Case凯斯', name: 'Case凯斯'},
                {value: 'SDLG临工', name: 'SDLG临工'},
                {value: 'JCB杰西博', name: 'JCB杰西博'},
                {value: 'Doosan斗山', name: 'Doosan斗山'},
                {value: 'Hyundai现代', name: 'Hyundai现代'},
                {value: 'Liugong柳工', name: 'Liugong柳工'},
                {value: 'SANY三一', name: 'SANY三一'},
                {value: 'XGMA夏工', name: 'XGMA夏工'},
                {value: 'Zoomlion中联重科', name: 'Zoomlion中联重科'},
                {value: 'SEM山工', name: 'SEM山工'},
                {value: 'Shantui山推', name: 'Shantui山推'},
                {value: 'XCMG徐工', name: 'XCMG徐工'},
                {value: 'Others其它', name: 'Others其它'},
            ],
            buyType: [
                {value: 'Dealer installment经销商分期', name: 'Dealer installment经销商分期'},
                {value: 'JDFL financing迪尔融资', name: 'JDFL financing迪尔融资'},
                {value: 'Full cash payment全款', name: 'Full cash payment全款'},
                {value: 'TBD待定', name: 'TBD待定'}

            ],
            dealerquote: [
                {value: '65万', name: '65万'},
                {value: '75万', name: '75万'},
                {value: '78万', name: '78万'},
                {value: '104万', name: '104万'},
                {value: '105万', name: '105万'},
                {value: '120万', name: '120万'},
                {value: '125万', name: '125万'},
                {value: '130万', name: '130万'},
                {value: '135万', name: '135万'},
                {value: '138万', name: '138万'},
                {value: '140万', name: '140万'},
                {value: '150万', name: '150万'},
                {value: '158万', name: '158万'},
                {value: '170万', name: '170万'},
                {value: '181万', name: '181万'},
                {value: '185万', name: '185万'},
                {value: '186万', name: '186万'},
                {value: '190万', name: '190万'},
                {value: '198万', name: '198万'},
                {value: '205万', name: '205万'},
                {value: '206万', name: '206万'},
                {value: '208万', name: '208万'},
                {value: '210万', name: '210万'},
            ],
            dealerpolicy: [
                {value: '2万抵4万', name: '2万抵4万'},
                {value: '交2万抵4万', name: '交2万抵4万'},
                {value: '送6.4万配件', name: '送6.4万配件'},
                {value: '送三年保险,2万配件', name: '送三年保险,2万配件'},
                {value: '赠送1万元配件', name: '赠送1万元配件'},
                {value: '赠送2万元配件', name: '赠送2万元配件'},
                {value: '无', name: '无'},
            ],
            lostorderReason: [
                {value: 'Brand recognition品牌认可度', name: 'Brand recognition品牌认可度'},
                {value: 'Commercial Term商务条件', name: 'Commercial Term商务条件'},
                {value: 'Customer Relationship客户关系/信任', name: 'Customer Relationship客户关系/信任'},
                {value: 'Machine performance产品表现 ', name: 'Machine performance产品表现'},
                {value: 'Price成交价格', name: 'Price成交价格'},
                {value: 'Retail Financing Term零售融资条件 ', name: 'Retail Financing Term零售融资条件'},
                {value: 'Quality质量', name: 'Quality质量'},
                {value: 'Parts配件', name: 'Parts配件'},
                {value: 'Others其它', name: 'Others其它'},
            ],
            interestRate: [
                {value: '7%', name: '7%'},
                {value: '50%', name: '50%'},
            ],
            downPayment: [
                {value: '10%', name: '10%'},
                {value: '20%', name: '20%'},
                {value: '30%', name: '30%'},
                {value: '40%', name: '40%'},
                {value: '50%', name: '50%'},
                {value: '60%', name: '60%'},
                {value: '70%', name: '70%'},
                {value: '80%', name: '80%'},
                {value: '90%', name: '90%'},
                {value: '100%', name: '100%'},
            ],
            replacementSubsidy: [
                {value: '5万', name: '5万'},
                {value: '7万', name: '7万'},
                {value: '无', name: '无'},
            ],
            accessbonus: [
                {value: '0.5万配件', name: '0.5万配件'},
                {value: '1万配件', name: '1万配件'},
                {value: '1.5万配件', name: '1.5万配件'},
                {value: '2万配件', name: '2万配件'},
                {value: '3万配件', name: '3万配件'},
                {value: '6.4万配件', name: '6.4万配件'},
                {value: '无', name: '无'},
            ],
            otherInformation: [
                {value: '送3年保险', name: '送3年保险'},
                {value: '无', name: '无'},
            ],
            transactionProbability: [
                {value: '50%', name: '50%'},
                {value: '75%', name: '75%'},
                {value: '100%', name: '100%'},
            ],
            lostBrandPosition: 0,
            lostBrandAndModel: [
                {
                    name: "CAT卡特", value: [
                        {value: '312C', name: '312C'},
                        {value: '312CL', name: '312CL'},
                        {value: '312D', name: '312D'},
                        {value: '312D2', name: '312D2'},
                        {value: '312D2GC', name: '312D2GC'},
                        {value: '312DL', name: '312DL'},
                        {value: '313D', name: '313D'},
                        {value: '313D2', name: '313D2'},
                        {value: '313D2GC', name: '313D2GC'},
                        {value: '313D2L', name: '313D2L'},
                        {value: '315CL', name: '315CL'},
                        {value: '315DL', name: '315DL'},
                        {value: '318D2L', name: '318D2L'},
                        {value: '318DL', name: '318DL'},
                        {value: '320BL', name: '320BL'},
                        {value: '320C', name: '320C'},
                        {value: '320CL', name: '320CL'},
                        {value: '320D', name: '320D'},
                        {value: '320D2', name: '320D2'},
                        {value: '320D2GC', name: '320D2GC'},
                        {value: '320D2L', name: '320D2L'},
                        {value: '320DGC', name: '320DGC'},
                        {value: '320DL', name: '320DL'},
                        {value: '323D2L', name: '323D2L'},
                        {value: '323DL', name: '323DL'},
                        {value: '324D', name: '324D'},
                        {value: '324DL', name: '324DL'},
                        {value: '325C', name: '325C'},
                        {value: '325CL', name: '325CL'},
                        {value: '325D', name: '325D'},
                        {value: '325DL', name: '325DL'},
                        {value: '326D2', name: '326D2'},
                        {value: '326D2L', name: '326D2L'},
                        {value: '326DL', name: '326DL'},
                        {value: '328DLCR', name: '328DLCR'},
                        {value: '329D', name: '329D'},
                        {value: '329D2', name: '329D2'},
                        {value: '329D2L', name: '329D2L'},
                        {value: '329DL', name: '329DL'},
                        {value: '330C', name: '330C'},
                        {value: '330CL', name: '330CL'},
                        {value: '330D', name: '330D'},
                        {value: '330D2L', name: '330D2L'},
                        {value: '330DL', name: '330DL'},
                        {value: '336D', name: '336D'},
                        {value: '336D2', name: '336D2'},
                        {value: '336D2GC', name: '336D2GC'},
                        {value: '336D2H', name: '336D2H'},
                        {value: '336D2L', name: '336D2L'},
                        {value: '336D2LXE', name: '336D2LXE'},
                        {value: '336DL', name: '336DL'},
                        {value: '340D2L', name: '340D2L'},
                        {value: '340DL', name: '340DL'},
                        {value: '345C', name: '345C'},
                        {value: '345CL', name: '345CL'},
                        {value: '345D', name: '345D'},
                        {value: '345DL', name: '345DL'},
                        {value: 'M313', name: 'M313'},
                        {value: 'M315D', name: 'M315D'},
                        {value: 'M315D2', name: 'M315D2'},
                        {value: 'M320D2', name: 'M320D2'},
                        {value: 'M322D', name: 'M322D'},
                        {value: 'M325DMH', name: 'M325DMH'},
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    name: "Hitachi日立", value: [
                        {value: 'ZAXIS130-5G', name: 'ZAXIS130-5G'},
                        {value: 'ZAXIS225US-3', name: 'ZAXIS225US-3'},
                        {value: 'ZAXIS330-3', name: 'ZAXIS330-3'},
                        {value: 'ZAXIS400LCH-3', name: 'ZAXIS400LCH-3'},
                        {value: 'ZH200-5A', name: 'ZH200-5A'},
                        {value: 'ZX110-3', name: 'ZX110-3'},
                        {value: 'ZX120', name: 'ZX120'},
                        {value: 'ZX130-5A', name: 'ZX130-5A'},
                        {value: 'ZX130H', name: 'ZX130H'},
                        {value: 'ZX130H-5A', name: 'ZX130H-5A'},
                        {value: 'ZX130L', name: 'ZX130L'},
                        {value: 'ZX135US-3', name: 'ZX135US-3'},
                        {value: 'ZX135US-5A', name: 'ZX135US-5A'},
                        {value: 'ZX135USK-3', name: 'ZX135USK-3'},
                        {value: 'ZX140W-3', name: 'ZX140W-3'},
                        {value: 'ZX160LC-5A', name: 'ZX160LC-5A'},
                        {value: 'ZX160W', name: 'ZX160W'},
                        {value: 'ZX170LC-5A', name: 'ZX170LC-5A'},
                        {value: 'ZX170W-3', name: 'ZX170LC-5A'},
                        {value: 'ZX190W-3', name: 'ZX190W-3'},
                        {value: 'ZX200-3', name: 'ZX200-3'},
                        {value: 'ZX200-3G', name: 'ZX200-3G'},
                        {value: 'ZX200-5A', name: 'ZX200-5A'},
                        {value: 'ZX200-5G', name: 'ZX200-5G'},
                        {value: 'ZX200LC-3', name: 'ZX200LC-3'},
                        {value: 'ZX200LC-3G', name: 'ZX200LC-3G'},
                        {value: 'ZX200LC-5A', name: 'ZX200LC-5A'},
                        {value: 'ZX210H-3', name: 'ZX210H-3'},
                        {value: 'ZX210H-3G', name: 'ZX210H-3G'},
                        {value: 'ZX210H-5A', name: 'ZX210H-5A'},
                        {value: 'ZX210H-5G', name: 'ZX210H-5G'},
                        {value: 'ZX210K-3', name: 'ZX210K-3'},
                        {value: 'ZX210K-3G', name: 'ZX210K-3G'},
                        {value: 'ZX210K-5A', name: 'ZX210K-5A'},
                        {value: 'ZX210K-5G', name: 'ZX210K-5G'},
                        {value: 'ZX210LC-3', name: 'ZX210LC-3'},
                        {value: 'ZX210LC-3G', name: 'ZX210LC-3G'},
                        {value: 'ZX210LC-5A', name: 'ZX210LC-5A'},
                        {value: 'ZX210LC-5G', name: 'ZX210LC-5G'},
                        {value: 'ZX210LCK-3', name: 'ZX210LCK-3'},
                        {value: 'ZX210W-3', name: 'ZX210W-3'},
                        {value: 'ZX225US-A', name: 'ZX225US-A'},
                        {value: 'ZX225USR-3', name: 'ZX225USR-3'},
                        {value: 'ZX240-3', name: 'ZX240-3'},
                        {value: 'ZX240-3G', name: 'ZX240-3G'},
                        {value: 'ZX240-5A', name: 'ZX240-5A'},
                        {value: 'ZX240LC-3', name: 'ZX240LC-3'},
                        {value: 'ZX240LC-3G', name: 'ZX240LC-3G'},
                        {value: 'ZX250H-3', name: 'ZX250H-3'},
                        {value: 'ZX250H-3G', name: 'ZX250H-3G'},
                        {value: 'ZX250H-5A', name: 'ZX250H-5A'},
                        {value: 'ZX250H-5G', name: 'ZX250H-5G'},
                        {value: 'ZX250K-3', name: 'ZX250K-3'},
                        {value: 'ZX250K-3G', name: 'ZX250K-3G'},
                        {value: 'ZX250K-5A', name: 'ZX250K-5A'},
                        {value: 'ZX250LC-3', name: 'ZX250LC-3'},
                        {value: 'ZX250LC-3G', name: 'ZX250LC-3G'},
                        {value: 'ZX250LC-5A', name: 'ZX250LC-5A'},
                        {value: 'ZX250LCH-3', name: 'ZX250LCH-3'},
                        {value: 'ZX260LCH-3G', name: 'ZX260LCH-3G'},
                        {value: 'ZX260LCH-5A', name: 'ZX260LCH-5A'},
                        {value: 'ZX270-3', name: 'ZX270-3'},
                        {value: 'ZX270LC-3', name: 'ZX270LC-3'},
                        {value: 'ZX280-5G', name: 'ZX280-5G'},
                        {value: 'ZX280LC-5G', name: 'ZX280LC-5G'},
                        {value: 'ZX300-5A', name: 'ZX300-5A'},
                        {value: 'ZX330-3', name: 'ZX330-3'},
                        {value: 'ZX330-3G', name: 'ZX330-3G'},
                        {value: 'ZX330-5A', name: 'ZX330-5A'},
                        {value: 'ZX330-5G', name: 'ZX330-5G'},
                        {value: 'ZX330LC-3', name: 'ZX330LC-3'},
                        {value: 'ZX330LC-3G', name: 'ZX330LC-3G'},
                        {value: 'ZX330LC-5A', name: 'ZX330LC-5A'},
                        {value: 'ZX330LC-5G', name: 'ZX330LC-5G'},
                        {value: 'ZX350H-3', name: 'ZX350H-3'},
                        {value: 'ZX350H-3G', name: 'ZX350H-3G'},
                        {value: 'ZX350H-5A', name: 'ZX350H-5A'},
                        {value: 'ZX350H-5G', name: 'ZX350H-5G'},
                        {value: 'ZX350K-3', name: 'ZX350K-3'},
                        {value: 'ZX350K-3G', name: 'ZX350K-3G'},
                        {value: 'ZX350K-5A', name: 'ZX350K-5A'},
                        {value: 'ZX350LCH-3', name: 'ZX350LCH-3'},
                        {value: 'ZX350LCH-5A', name: 'ZX350LCH-5A'},
                        {value: 'ZX350LCH-5G', name: 'ZX350LCH-5G'},
                        {value: 'ZX350LCK-3', name: 'ZX350LCK-3'},
                        {value: 'ZX360H-3', name: 'ZX360H-3'},
                        {value: 'ZX360H-3G', name: 'ZX360H-3G'},
                        {value: 'ZX360H-5A', name: 'ZX360H-5A'},
                        {value: 'ZX360H-5G', name: 'ZX360H-5G'},
                        {value: 'ZX360K-5A', name: 'ZX360K-5A'},
                        {value: 'ZX360K-5G', name: 'ZX360K-5G'},
                        {value: 'ZX360LC-3', name: 'ZX360LC-3'},
                        {value: 'ZX360LC-3G', name: 'ZX360LC-3G'},
                        {value: 'ZX360LC-5A', name: 'ZX360LC-5A'},
                        {value: 'ZX360LC-5G', name: 'ZX360LC-5G'},
                        {value: 'ZX400LCH-5A', name: 'ZX400LCH-5A'},
                        {value: 'ZX450H', name: 'ZX450H'},
                        {value: 'ZX450LC-3', name: 'ZX450LC-3'},
                        {value: 'ZXXIS330LC-5A', name: 'ZXXIS330LC-5A'},
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    name: "Kobelco神钢", value: [
                        {value: 'SK115SR', name: 'SK115SR'},
                        {value: 'SK130-8', name: 'SK130-8'},
                        {value: 'SK135', name: 'SK135'},
                        {value: 'SK140LC-8', name: 'SK140LC-8'},
                        {value: 'SK200-10', name: 'SK200-10'},
                        {value: 'SK200-8', name: 'SK200-8'},
                        {value: 'SK210LC-10', name: 'SK210LC-10'},
                        {value: 'SK210LC-8', name: 'SK210LC-8'},
                        {value: 'SK220XD-10', name: 'SK220XD-10'},
                        {value: 'SK250-10', name: 'SK250-10'},
                        {value: 'SK250-8', name: 'SK250-8'},
                        {value: 'SK260LC-10', name: 'SK260LC-10'},
                        {value: 'SK260LC-8', name: 'SK260LC-8'},
                        {value: 'SK270D', name: 'SK270D'},
                        {value: 'SK270D-10', name: 'SK270D-10'},
                        {value: 'SK330-10', name: 'SK330-10'},
                        {value: 'SK330-8', name: 'SK330-8'},
                        {value: 'SK350LC-10', name: 'SK350LC-10'},
                        {value: 'SK350LC-8', name: 'SK350LC-8'},
                        {value: 'SK380D', name: 'SK380D'},
                        {value: 'SK380XD-10', name: 'SK380XD-10'},
                        {value: '其它others', name: '其它others'}]
                },
                {
                    index: 3,
                    name: "Komatsu小松", value: [
                        {value: 'PC100N-6', name: 'PC100N-6'},
                        {value: 'PC110-8', name: 'PC110-8'},
                        {value: 'PC130-8', name: 'PC130-8'},
                        {value: 'PC160LC-7', name: 'PC160LC-7'},
                        {value: 'PC160LC-8', name: 'PC160LC-8'},
                        {value: 'PC200-8', name: 'PC200-8'},
                        {value: 'PC200LC-8', name: 'PC200LC-8'},
                        {value: 'PC210-8', name: 'PC210-8'},
                        {value: 'PC210LC-8', name: 'PC210LC-8'},
                        {value: 'PC220-8', name: 'PC220-8'},
                        {value: 'PC240LC-8', name: 'PC240LC-8'},
                        {value: 'PC270-7', name: 'PC270-7'},
                        {value: 'PC270-8', name: 'PC270-8'},
                        {value: 'PC300-8', name: 'PC300-8'},
                        {value: 'PC360-8', name: 'PC360-8'},
                        {value: 'PC400-8', name: 'PC400-8'},
                        {value: 'PC450-8', name: 'PC450-8'},
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 4,
                    name: "Sumitomo住友", value: [
                        {value: 'SH130-5', name: 'SH130-5'},
                        {value: 'SH130-6', name: 'SH130-6'},
                        {value: 'SH180-6', name: 'SH180-6'},
                        {value: 'SH210-5', name: 'SH210-5'},
                        {value: 'SH210-6', name: 'SH210-6'},
                        {value: 'SH220LC-5', name: 'SH220LC-5'},
                        {value: 'SH220LC-6', name: 'SH220LC-6'},
                        {value: 'SH240-5', name: 'SH240-5'},
                        {value: 'SH240-6', name: 'SH240-6'},
                        {value: 'SH260LC-6', name: 'SH260LC-6'},
                        {value: 'SH260LC-6', name: 'SH260LC-6'},
                        {value: 'SH300-6', name: 'SH300-6'},
                        {value: 'SH350-5', name: 'SH350-5'},
                        {value: 'SH360HD-5', name: 'SH360HD-5'},
                        {value: 'SH360HD-6', name: 'SH360HD-6'},
                        {value: 'SH380-5', name: 'SH380-5'},
                        {value: 'SH380LHD-6', name: 'SH380LHD-6'},
                        {value: '其它others', name: '其它others'}

                    ]
                },
                {
                    index: 5,
                    name: "Volvo沃尔沃", value: [
                        {value: 'EC120D', name: 'EC120D'},
                        {value: 'EC140BLC', name: 'EC140BLC'},
                        {value: 'EC140DL', name: 'EC140DL'},
                        {value: 'EC170DL', name: 'EC170DL'},
                        {value: 'EC18D', name: 'EC18D'},
                        {value: 'EC200B', name: 'EC200B'},
                        {value: 'EC200D', name: 'EC200D'},
                        {value: 'EC210B', name: 'EC210B'},
                        {value: 'EC210BLC', name: 'EC210BLC'},
                        {value: 'EC210BLR', name: 'EC210BLR'},
                        {value: 'EC210D', name: 'EC210D'},
                        {value: 'EC220D', name: 'EC220D'},
                        {value: 'EC220DL', name: 'EC220DL'},
                        {value: 'EC220DLR', name: 'EC220DLR'},
                        {value: 'EC240B', name: 'EC240B'},
                        {value: 'EC240BLC', name: 'EC240BLC'},
                        {value: 'EC250D', name: 'EC250D'},
                        {value: 'EC250DL', name: 'EC250DL'},
                        {value: 'EC290BLC', name: 'EC290BLC'},
                        {value: 'EC300DL', name: 'EC300DL'},
                        {value: 'EC350D', name: 'EC350D'},
                        {value: 'EC350DL', name: 'EC350DL'},
                        {value: 'EC360BLC', name: 'EC360BLC'},
                        {value: 'EC380DL', name: 'EC380DL'},
                        {value: 'EW145B', name: 'EW145B'},
                        {value: 'EW205', name: 'EW205'},
                        {value: '其它others', name: '其它others'}

                    ]
                },
                {
                    index: 6,
                    name: "Case凯斯", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 7,
                    name: "SDLG临工", value: [
                        {value: 'E6135F', name: 'E6135F'},
                        {value: 'E6150F', name: 'E6150F'},
                        {value: 'E6210F', name: 'E6210F'},
                        {value: 'E6225F', name: 'E6225F'},
                        {value: 'E6250F', name: 'E6250F'},
                        {value: 'E6300F', name: 'E6300F'},
                        {value: 'E6360F', name: 'E6360F'},
                        {value: 'E6400F', name: 'E6400F'},
                        {value: 'LG6135', name: 'LG6135'},
                        {value: 'LG6135E', name: 'LG6135E'},
                        {value: 'LG6140E', name: 'LG6140E'},
                        {value: 'LG6150', name: 'LG6150'},
                        {value: 'LG6150E', name: 'LG6150E'},
                        {value: 'LG6210', name: 'LG6210'},
                        {value: 'LG6220', name: 'LG6220'},
                        {value: 'LG6225', name: 'LG6225'},
                        {value: 'LG6225E', name: 'LG6225E'},
                        {value: 'LG6235', name: 'LG6235'},
                        {value: 'LG6250', name: 'LG6250'},
                        {value: 'LG6270', name: 'LG6270'},
                        {value: 'LG6300', name: 'LG6300'},
                        {value: 'LG6360', name: 'LG6360'},
                        {value: 'LG6400', name: 'LG6400'},
                        {value: 'LGW6150', name: 'LGW6150'},
                        {value: '其它others', name: '其它others'},

                    ]
                },
                {
                    index: 8,
                    name: "JCB杰西博", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 9,
                    name: "Doosan斗山", value: [
                        {value: 'DH150LC-7', name: 'DH150LC-7'},
                        {value: 'DH150W-7', name: 'DH150W-7'},
                        {value: 'DH210W-7', name: 'DH210W-7'},
                        {value: 'DH215-9', name: 'DH215-9'},
                        {value: 'DH215-9E', name: 'DH215-9E'},
                        {value: 'DH220LC-9E', name: 'DH220LC-9E'},
                        {value: 'DH225LC-9', name: 'DH225LC-9'},
                        {value: 'DH258LC-7', name: 'DH258LC-7'},
                        {value: 'DH300LC-7', name: 'DH300LC-7'},
                        {value: 'DH370LC-9', name: 'DH370LC-9'},
                        {value: 'DH420LC-7', name: 'DH420LC-7'},
                        {value: 'DX120', name: 'DX120'},
                        {value: 'DX120-9C', name: 'DX120-9C'},
                        {value: 'DX150-9C', name: 'DX150-9C'},
                        {value: 'DX150LC', name: 'DX150LC'},
                        {value: 'DX150LC-9C', name: 'DX150LC-9C'},
                        {value: 'DX150W-9C', name: 'DX150W-9C'},
                        {value: 'DX210W-9C', name: 'DX210W-9C'},
                        {value: 'DX215-9C', name: 'DX215-9C'},
                        {value: 'DX220-9C', name: 'DX220-9C'},
                        {value: 'DX220LC-9C', name: 'DX220LC-9C'},
                        {value: 'DX225-9C', name: 'DX225-9C'},
                        {value: 'DX225LC-9C', name: 'DX225LC-9C'},
                        {value: 'DX230LC', name: 'DX230LC'},
                        {value: 'DX260LC', name: 'DX260LC'},
                        {value: 'DX260LC-9C', name: 'DX260LC-9C'},
                        {value: 'DX300LC', name: 'DX300LC'},
                        {value: 'DX300LC-9C', name: 'DX300LC-9C'},
                        {value: 'DX300LL', name: 'DX300LL'},
                        {value: 'DX340LC-9C', name: 'DX340LC-9C'},
                        {value: 'DX345LC', name: 'DX345LC'},
                        {value: 'DX350LC', name: 'DX350LC'},
                        {value: 'DX380LC', name: 'DX380LC'},
                        {value: 'DX380LC-9C', name: 'DX380LC-9C'},
                        {value: 'DX420LC', name: 'DX420LC'},
                        {value: 'DX420LC-9C', name: 'DX420LC-9C'},
                        {value: 'S150', name: 'S150'},
                        {value: 'S225', name: 'S225'},
                        {value: 'S225LL', name: 'S225LL'},
                        {value: 'S300', name: 'S300'},
                        {value: '其它others', name: '其它others'}

                    ]
                },
                {
                    index: 10,
                    name: "Hyundai现代", value: [
                        {value: 'R110-7', name: 'R110-7'},
                        {value: 'R110VS', name: 'R110VS'},
                        {value: 'R130LC-5', name: 'R130LC-5'},
                        {value: 'R130VS', name: 'R130VS'},
                        {value: 'R130W-5', name: 'R130W-5'},
                        {value: 'R150LC-7', name: 'R150LC-7'},
                        {value: 'R150LC-9', name: 'R150LC-9'},
                        {value: 'R150LVS', name: 'R150LVS'},
                        {value: 'R150W-7', name: 'R150W-7'},
                        {value: 'R150W-9', name: 'R150W-9'},
                        {value: 'R150WVS', name: 'R150WVS'},
                        {value: 'R170LC-5', name: 'R170LC-5'},
                        {value: 'R190LC-5', name: 'R190LC-5'},
                        {value: 'R210W-5', name: 'R210W-5'},
                        {value: 'R210W-7', name: 'R210W-7'},
                        {value: 'R210W-9', name: 'R210W-9'},
                        {value: 'R210WVS', name: 'R210WVS'},
                        {value: 'R215-7', name: 'R215-7'},
                        {value: 'R215-7C', name: 'R215-7C'},
                        {value: 'R215-9', name: 'R215-9'},
                        {value: 'R215-9C', name: 'R215-9C'},
                        {value: 'R215VS', name: 'R215VS'},
                        {value: 'R225LC-7', name: 'R225LC-7'},
                        {value: 'R225LC-9', name: 'R225LC-9'},
                        {value: 'R225LC-9T', name: 'R225LC-9T'},
                        {value: 'R225LVS', name: 'R225LVS'},
                        {value: 'R245LC-9F', name: 'R245LC-9F'},
                        {value: 'R260LC-5', name: 'R260LC-5'},
                        {value: 'R260LC-7', name: 'R260LC-7'},
                        {value: 'R265LC-7', name: 'R265LC-7'},
                        {value: 'R265LC-9', name: 'R265LC-9'},
                        {value: 'R275LC-9T', name: 'R275LC-9T'},
                        {value: 'R275LVS', name: 'R275LVS'},
                        {value: 'R305LC-7', name: 'R305LC-7'},
                        {value: 'R305LC-9', name: 'R305LC-9'},
                        {value: 'R305LC-9T', name: 'R305LC-9T'},
                        {value: 'R305LVS', name: 'R305LVS'},
                        {value: 'R335LC-7', name: 'R335LC-7'},
                        {value: 'R335LC-9', name: 'R335LC-9'},
                        {value: 'R335LC-9T', name: 'R335LC-9T'},
                        {value: 'R350LVS', name: 'R350LVS'},
                        {value: 'R370LC-7', name: 'R370LC-7'},
                        {value: 'R375LC-7H', name: 'R375LC-7H'},
                        {value: 'R385LC-9', name: 'R385LC-9'},
                        {value: 'R385LC-9T', name: 'R385LC-9T'},
                        {value: 'R385LVS', name: 'R385LVS'},
                        {value: 'R450LC-5', name: 'R450LC-5'},
                        {value: 'R455LC-7', name: 'R455LC-7'},
                        {value: '其它others', name: '其它others'}

                    ]
                },
                {
                    index: 11,
                    name: "Liugong柳工", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 12,
                    name: "SANY三一", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 13,
                    name: "XGMA夏工", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 14,
                    name: "Zoomlion中联重科", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 15,
                    name: "SEM山工", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 16,
                    name: "Shantui山推", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 17,
                    name: "XCMG徐工", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                },
                {
                    index: 18,
                    name: "Others其它", value: [
                        {value: '其它others', name: '其它others'}
                    ]
                }
            ]
        },
        methods: {
            showDatePicker: function (e, type) {
                var that = this;
                WdatePicker({
                    onpicked: function (dp) {
                        if (type == "actualDate") {
                            that.track.main.actualDate = dp.cal.getNewDateStr();
                        }
                        if (type == "shijiLoseDate") {
                            that.track.main.shijiLoseDate = dp.cal.getNewDateStr();
                        }
                        if (type == "deliveryDate") {
                            that.track.main.deliveryDate = dp.cal.getNewDateStr();
                        }
                        return true;
                    },
                    //dateFmt:'yyyy-MM-dd HH:mm'
                });
                $(e.target).blur();
            },
            showDz: function () {
                var html = '';
                if (this.track.main.provinceName) {
                    html += this.track.main.provinceName;
                }
                if (this.track.main.cityName != '') {
                    html += "-" + this.track.main.cityName;
                }
                if (this.track.main.countyName != '') {
                    html += "-" + this.track.main.countyName;
                }
                return html;
            },
            hiddenDivModel: function () {
                $("#countyIdel").hide();
            },
            getIntentionModel: function () {
                var that = this;
                that.track.main.provinceName = $("#provinceN option:selected").text();
                that.track.main.cityName = $("#cityN option:selected").text();
                that.track.main.countyName = $("#countyN option:selected").text();
                this.hiddenDivModel()
            },
            getCounty: function (id) {
                var that = this;
                $.wyui.postMethod('/intentCustomer/getForProvinceById.json', {'id': id}, function (r) {
                    console.log(r);
                    that.itemsMod = r.records;
                })

            },
            getCity: function (id) {
                var that = this;
                that.cityId = "市区";
                that.countyId = "县";
                that.itemsMod = "";
                var data = {};
                $.wyui.postMethod('/intentCustomer/getForProvinceById.json', {'id': id}, function (r) {
                    console.log(r);
                    that.itemsBran = r.records;
                })
            },
            goBack: function () {
                api.close();
            },
            addEn: function () {
                var item = currentUser.companyName;
                var company = "";
                if (item == '黑龙江灜源') {
                    company = "Heilongjiang Yingyuan黑龙江灜源";
                }
                if (item == '吉林清源') {
                    company = "Jilin Qingyuan吉林清源";
                }
                if (item == '辽宁灜湖') {
                    company = "Liaoning Yinghu辽宁灜湖";
                }
                if (item == '河北灜源') {
                    company = "Hebei Yingyuan河北灜源";
                }
                if (item == '甘肃&宁夏') {
                    company = "Gansu Qingyuan甘肃清源";
                }
                if (item == '湖南清源') {
                    company = "Hunan Qingyuan湖南清源";
                }
                if (item == '安徽灜湖') {
                    company = "Anhui Yinghu安徽灜湖";
                }
                if (item == '江苏滚滚向前') {
                    company = "Jiangsu Gungunxiangqian江苏滚滚向前";
                }
                //console.log(company)
                return company;
            },
            getMyDate: function () {
                var currentMonth = new Date().Format('M');
                var currentday = new Date().Format('d');
                var currentDate = new Date().Format('yyyy年') + currentMonth + "月 ";
                if (currentday <= 10) {
                    currentDate += "上旬";
                }
                if (currentday >= 20) {
                    currentDate += "下旬";
                }
                if (currentday > 10 && currentday < 20) {
                    currentDate += "中旬";
                }
                return currentDate;
            },
            getMyLostDate: function () {
                var that = this;
                var preMonth = new Date().Format('M') - 1;
                console.log(preMonth);
                for (var i = 0; i < 2; i++) {
                    var preDate = new Date().Format('yyyy年') + (Number(preMonth) + i) + "月 ";
                    var preDate1 = {name: preDate + "上旬", value: preDate + "上旬"}
                    var preDate2 = {name: preDate + "中旬", value: preDate + "中旬"}
                    var preDate3 = {name: preDate + "下旬", value: preDate + "下旬"}
                    that.MyLostDate.push(preDate1)
                    that.MyLostDate.push(preDate2)
                    that.MyLostDate.push(preDate3)
                }
            },
            //获取上中下旬
            setMyDate: function () {
                var that = this;
                var currentMonth = new Date().Format('M');
                console.log('currentMonth = ' + currentMonth);
                /* for (var i = 1; i <= currentMonth; i++) {
                     var currentDate = new Date().Format('yyyy年') + i + "月 ";
                     var currentDate1 = {name: currentDate + "上旬", value: currentDate + "上旬"}
                     var currentDate2 = {name: currentDate + "中旬", value: currentDate + "中旬"}
                     var currentDate3 = {name: currentDate + "下旬", value: currentDate + "下旬"}
                     that.myDateList.push(currentDate1)
                     that.myDateList.push(currentDate2)
                     that.myDateList.push(currentDate3)
                 }*/
                var currentDate = new Date().Format('yyyy年') + currentMonth + "月 ";
                var currentDate1 = {name: currentDate + "上旬", value: currentDate + "上旬"}
                var currentDate2 = {name: currentDate + "中旬", value: currentDate + "中旬"}
                var currentDate3 = {name: currentDate + "下旬", value: currentDate + "下旬"}
                that.myDateList.push(currentDate1)
                that.myDateList.push(currentDate2)
                that.myDateList.push(currentDate3)

            },
            setMyDateTime: function () {
                var that = this;
                var currentMonth = new Date().Format('M');
                console.log('currentMonth = ' + currentMonth);
                for (var i = 0; i <= 2; i++) {
                    var currentDate = new Date().Format('yyyy年') + (Number(currentMonth) + i) + "月 ";
                    var currentDate1 = {name: currentDate + "上旬", value: currentDate + "上旬"}
                    var currentDate2 = {name: currentDate + "中旬", value: currentDate + "中旬"}
                    var currentDate3 = {name: currentDate + "下旬", value: currentDate + "下旬"}
                    that.myDateTimeList.push(currentDate1)
                    that.myDateTimeList.push(currentDate2)
                    that.myDateTimeList.push(currentDate3)
                }
                that.myDateTimeList.push({name: "TBD待定", value: "TBD待定"})
            },
            save: function (auditFlag) {
                this.checkProp()
                if (this.track.main.informationIntegrity != '100%') {
                    alert('请先完善信息')
                    return
                }
                var that = this;
                that.track.main.havingModel = that.track.main.havingModel.toUpperCase();
                that.track.main.auditFlag = auditFlag;
                that.track.main.bigRegionalId = currentUser.departId;
                that.track.main.companyId = currentUser.companyId;
                that.track.main.companyName = that.addEn();
                that.track.main.confirmationDate = that.getMyDate();
                console.log(that.getMyDate())
//                that.track.main.competitorBrand = that.myCheckList.join(",");
//                 that.track.main.lostorderReason = that.myLoseList.join(",");
                delete that.track.main.createTime;
                delete that.track.main.updateTime;
                for (var i = 0; i < that.myModelList.length; i++) {
                    if (that.myModelList[i].modelName == that.track.main.needModel) {
                        that.track.main.needModelId = that.myModelList[i].modelId;
                    }
                }
                $.wyui.postMethod(urlConfig.thursday.save, trimRN(that.track), function (data) {
                    if (auditFlag == '0') {
                        alert('提交成功');
                    } else {
                        alert('保存成功');
                    }
                    var pageId = top.getActivePageId();
                    var $iframe = top.findIframeByName("每周三商机跟踪");
                    $iframe[0].contentWindow.app.getThurTrackList();
                    top.closeTabByPageId(pageId);
                })
            },
            brandId: function () {
                var that = this;
                $.wyui.postMethod('/deviceModel/getModelListByBId.json',
                    {brandId: '2018030812524F958DA4817F9A4A40A6'}, function (data) {
                        that.myModelList = data.models;
                        console.log(that.myModelList)
                    })
            },
            // checkedOne: function (moduleKey) {
            //     var idIndex = (this.myCheckList).indexOf(moduleKey);
            //     if (idIndex >= 0) {
            //         // 如果已经包含了该id, 则去除(单选按钮由选中变为非选中状态)
            //         this.myCheckList.splice(idIndex, 1)
            //     } else {
            //         // 选中该checkbox
            //         this.myCheckList.push(moduleKey)
            //     }
            // },
            // checkedOne1: function (moduleKey) {
            //     var idIndex = (this.myLoseList).indexOf(moduleKey);
            //     if (idIndex >= 0) {
            //         // 如果已经包含了该id, 则去除(单选按钮由选中变为非选中状态)
            //         this.myLoseList.splice(idIndex, 1)
            //     } else {
            //         // 选中该checkbox
            //         this.myLoseList.push(moduleKey)
            //     }
            //     this.checkProp()
            // },
            getTrackById: function () {
                var that = this;
                $.wyui.postMethod(urlConfig.thursday.getTrackById, {
                    id: that.id
                }, function (data) {
                    console.log(data);
                    that.track = data;

                    that.allInputParamObj.customerName = that.track.main.customerName
                    that.allInputParamObj.customerTel = that.track.main.customerTel
                    that.allInputParamObj.customerAddress = that.track.main.customerAddress
                    that.allInputParamObj.buildCityName = that.track.main.buildCityName
                    that.allInputParamObj.havingModel = that.track.main.havingModel
                    that.allInputParamObj.buildCondition = that.track.main.buildCondition
                    that.allInputParamObj.needNumber = that.track.main.needNumber
                    that.allInputParamObj.replacementModel = that.track.main.replacementModel
                    that.allInputParamObj.dealerquote = that.track.main.dealerquote
                    that.allInputParamObj.transactionProbability = that.track.main.transactionProbability
                    that.allInputParamObj.dealerpolicy = that.track.main.dealerpolicy
                    that.allInputParamObj.salePrice = that.track.main.salePrice
                    that.allInputParamObj.interestRate = that.track.main.interestRate
                    that.allInputParamObj.downPayment = that.track.main.downPayment
                    that.allInputParamObj.replacementSubsidy = that.track.main.replacementSubsidy
                    that.allInputParamObj.accessbonus = that.track.main.accessbonus
                    that.allInputParamObj.otherInformation = that.track.main.otherInformation
                    that.allInputParamObj.yhdeOlder = that.track.main.yhdeOlder
                    that.allInputParamObj.closeorderProbability = that.track.main.closeorderProbability
                    that.allInputParamObj.lostorderBrand = that.track.main.lostorderBrand
                    that.allInputParamObj.lostorderModel = that.track.main.lostorderModel
                    that.allInputParamObj.lostorderFlag = that.track.main.lostorderFlag
                    that.allInputParamObj.lostorderReason = that.track.main.lostorderReason
                    that.allInputParamObj.lostorderReasonDetails = that.track.main.lostorderReasonDetails
                    that.allInputParamObj.confirmationStatus = that.track.main.confirmationStatus
                    that.allInputParamObj.needModel = that.track.main.needModel
                    that.allInputParamObj.deliveryDate = that.track.main.deliveryDate
                    that.allInputParamObj.buyType = that.track.main.buyType
                    that.allInputParamObj.competitorBrand = that.track.main.competitorBrand
                    // if (that.track.main.competitorBrand) {
                    //     that.myCheckList = that.track.main.competitorBrand.split(',');
                    // }
                    // if (that.track.main.lostorderReason) {
                    //     that.myLoseList = that.track.main.lostorderReason.split(',');
                    // }
                })
            },
            applyAudit: function (auditFlag) {
                if (auditFlag == "2") {
                } else {
                    if (!confirm("确定要通过吗？")) {
                        return;
                    }
                }
                var that = this;
                $.wyui.postMethod(urlConfig.thursday.applyAudit, {
                    id: that.id,
                    userId: getCurrentUser().id,
                    userName: getCurrentUser().name,
                    auditFlag: auditFlag,
                    roleName: getCurrentUser().roleName,
                    advise: ''
                }, function (data) {
                    alert('审核成功');
                    var pageId = top.getActivePageId();
                    var $iframe = top.findIframeByName("每周三商机跟踪");
                    $iframe[0].contentWindow.app.getThurTrackList();
                    top.closeTabByPageId(pageId);
                })
            },
            convertAuditFlagToName: function (item) {
                switch (Number(item.auditFlag)) {
                    case -1:
                        return "未提交";
                        break;
                    case 0:
                        return "待审核";
                        break;
                    case 1:
                        return "已通过";
                        break;
                    case 2:
                        return "已驳回";
                        break;
                    default :
                        break;
                }
            },
            copierReturn: function () {
                var that = this;
                top.$.dialog({
                    content: 'url:/page/reportForm/salesForecastReport/thursdayCopierReturnReason.html?id=' + that.id + "&pageType=1" + "&t=" + new Date(),
                    title: '填写驳回原因',
                    width: 300,
                    height: 200,
                    max: false,
                    min: false,
                    lock: true
                });
            },
            changeLostBrandPosition: function (paramKey) {
                // alert(this.lostBrandPosition)
                for (var i = 0; i < this.lostBrandAndModel.length; i++) {
                    if (this.lostBrandAndModel[i].name == paramKey) {
                        this.lostBrandPosition = i
                    }
                }
                if (this.lostBrandAndModel[this.lostBrandPosition].name != this.track.main.lostorderBrand) {
                    //品牌不一样,清空型号
                    this.track.main.lostorderModel = ""
                    this.allInputParamObj['lostorderModel'] = ""
                }

                this.checkProp(paramKey)
            },
            changeState: function (paramKey) {
                if (this.pageType == 'edit' && this.track.main.confirmationStatus.indexOf('丢单') <= 0) {
                    //编辑且不是丢单状态,丢单信息默认写无
                    this.track.main.lostorderBrand = "无"
                    this.track.main.lostorderModel = "无"
                    this.track.main.lostorderFlag = "N否"
                    this.track.main.lostorderReason = "Others其它"
                    this.track.main.lostorderReasonDetails = "无"
                    this.allInputParamObj['lostorderBrand'] = this.track.main.lostorderBrand
                    this.allInputParamObj['lostorderModel'] = this.track.main.lostorderModel
                    this.allInputParamObj['lostorderFlag'] = this.track.main.lostorderFlag
                    this.allInputParamObj['lostorderReason'] = this.track.main.lostorderReason
                    this.allInputParamObj['lostorderReasonDetails'] = this.track.main.lostorderReasonDetails
                } else {
                    this.track.main.lostorderBrand = ""
                    this.track.main.lostorderModel = ""
                    this.track.main.lostorderFlag = ""
                    this.track.main.lostorderReason = ""
                    this.track.main.lostorderReasonDetails = ""
                    this.allInputParamObj['lostorderBrand'] = ""
                    this.allInputParamObj['lostorderModel'] = ""
                    this.allInputParamObj['lostorderFlag'] = ""
                    this.allInputParamObj['lostorderReason'] = ""
                    this.allInputParamObj['lostorderReasonDetails'] = ""
                }
                this.checkProp(paramKey)
            },
            checkProp: function (paramKey) {
                if(paramKey == 'havingModel'){
                    this.track.main.havingModel = this.track.main.havingModel.toUpperCase();
                }
                this.allInputParamObj[paramKey] = this.track.main[paramKey]
                console.log("input: " + JSON.stringify(this.allInputParamObj))
                var count = 0
                var max = 0

                $.each(this.allInputParamObj, function (i, val) {
                    console.log(i,val)
                    if (val != ''&&val!=undefined) {
                        count++
                    }
                    max++
                });

                if (this.track.main.confirmationStatus.indexOf('丢单') <= 0) {
                    this.inputNum = count
                    console.log('input: 填写 = ' + count + "个, obj共" + max + "个, 全部(非丢单状态)" + (this.allNum) + "个")
                } else {
                    this.inputNum = count
                    console.log('input: 填写 = ' + count + "个, obj共" + max + "个, 全部(丢单)" + (this.allNum) + "个")
                }
                var ratio = Math.round((this.inputNum / this.allNum) * 100)
                this.track.main.informationIntegrity = ratio + "%"
                console.log('input: 信息完整度 = ' + ratio + "%")
            }
        },
        mounted: function () {
            var that = this;
            //计算自定义日期myDate
            this.setMyDate();
            this.setMyDateTime();
            this.getMyLostDate();
            this.brandId();
            that.addEn();
            if (parseInt($.wyui.page.urlParams.id) > 0) {
                this.getTrackById();
            }
            $.wyui.postMethod('/intentCustomer/getForProvinceById.json', {'id': '0'}, function (r) {
                that.itemsType = r.records;
            })
        }
    });
    $(function () {
        $("#customerName").autoComplete({
            url: server.ip + urlConfig.contract.getNameAndTel,
            render: function (users, panel) {
                console.log("users=" + users);
                if (users) {
                    for (var i = 0; i < users.length; i++) {
                        $("<li></li>").data("autoComplete",
                            users[i]).html("<a>" + users[i].customerName + "&nbsp;&nbsp;&nbsp;" +
                            "(" + "&nbsp;" + users[i].customerTel + ") " + "</a>")
                            .appendTo(panel);
                    }
                }
            },
            selected: function (user) {
                app.track.main.customerId = user.customerId;
                app.track.main.customerName = user.customerName;
                app.track.main.customerTel = user.customerTel;
                app.checkProp('customerName')
                app.checkProp('customerTel')
                return false;
            },
            extraParams: {createUserId: getCurrentUser().id},
            height: 210,
            width: 300
        });
    });
</script>
<script>
    $('[contenteditable]').each(function () {
        // 干掉IE http之类地址自动加链接
        try {
            document.execCommand("AutoUrlDetect", false, false);
        } catch (e) {
        }

        $(this).on('paste', function (e) {
            e.preventDefault();
            var text = null;

            if (window.clipboardData && clipboardData.setData) {
                // IE
                text = window.clipboardData.getData('text');
            } else {
                text = (e.originalEvent || e).clipboardData.getData('text/plain') || prompt('在这里输入文本');
            }
            if (document.body.createTextRange) {
                if (document.selection) {
                    textRange = document.selection.createRange();
                } else if (window.getSelection) {
                    sel = window.getSelection();
                    var range = sel.getRangeAt(0);

                    // 创建临时元素，使得TextRange可以移动到正确的位置
                    var tempEl = document.createElement("span");
                    tempEl.innerHTML = "&#FEFF;";
                    range.deleteContents();
                    range.insertNode(tempEl);
                    textRange = document.body.createTextRange();
                    textRange.moveToElementText(tempEl);
                    tempEl.parentNode.removeChild(tempEl);
                }
                textRange.text = text;
                textRange.collapse(false);
                textRange.select();
            } else {
                // Chrome之类浏览器
                document.execCommand("insertText", false, text);
            }
        });
        // 去除Crtl+b/Ctrl+i/Ctrl+u等快捷键
        $(this).on('keydown', function (e) {
            // e.metaKey for mac
            if (e.ctrlKey || e.metaKey) {
                switch (e.keyCode) {
                    case 66: //ctrl+B or ctrl+b
                    case 98:
                    case 73: //ctrl+I or ctrl+i
                    case 105:
                    case 85: //ctrl+U or ctrl+u
                    case 117: {
                        e.preventDefault();
                        break;
                    }
                }
            }
        });
    });
</script>
</body>
</html>